

			  {include file="app/manage/view/index/nav"}
              
          
<link rel="stylesheet" href="{__PUBLIC__}assets/css/chosen.min.css" />

				<div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
					<i id="sidebar-toggle-icon" class="ace-icon fa fa-angle-double-left ace-save-state" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
				</div>
			</div>

			<div class="main-content">
				<div class="main-content-inner">
					<div class="breadcrumbs ace-save-state" id="breadcrumbs">
						<ul class="breadcrumb">
							<li>
								<i class="ace-icon fa fa-home home-icon"></i>
								<a href="index.php?r=manage/index/index">首页</a>
							</li>
							<li class="active">{$pagetext['0']}</li>
						</ul><!-- /.breadcrumb -->

						<div class="nav-search" id="nav-search">
							<form class="form-search">
								<span class="input-icon">
									<input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
									<i class="ace-icon fa fa-search nav-search-icon"></i>
								</span>
							</form>
						</div><!-- /.nav-search -->
					</div>

					<div class="page-content">
                    <div class="page-header">
							<h1>
								{$pagetext['0']}
								<small>
									<i class="ace-icon fa fa-angle-double-right"></i>
									{$pagetext['1']}
								</small>
							</h1>
						</div>
                        <div class="widget-box">
												<div class="widget-header">
													<h4 class="widget-title">{$pagetext['1']}</h4>
												</div>

												<div class="widget-body">
													<div class="widget-main">
												
											</div>
                  <form class="form-horizontal"  id="form" action="" method="post">
									<div class="widget-body">
													<div class="widget-main">
														<div>
															<label  class="formtitle" for="form-field-8">标题</label>

														<input type="text" name="title" id="form-field-1" value="{$ret['title']}" placeholder="幻灯广告标题" class="form-control">
														</div>
                                                        <hr>
                                                        	<div>
															<label  class="formtitle" for="form-field-8">显示平台</label>

													     <select name="type"  class="form-control">
                                                         
                                                          <option {if $ret['type']=='0'} selected="selected" {/if} value="0">PC网站</option>
                                                          <option  {if $ret['type']=='1'} selected="selected" {/if} value="1">移动端</option>
                                                         </select>
														</div>

														

														<hr>
                                                        	<div>
															<label  class="formtitle"  for="form-field-11">封面</label>


											<div class="uploadimg tupian" onClick="upthis()">
                                              {if !$ret['pic']}
                                              <i class="ace-icon fa fa-cloud-upload"></i>
                                              <dt>1900*449</dt>
                                              {else}
                                              <img src="{$ret['pic']}" />
                                              {/if}
                                              
                                            </div>
										</div>
                                        <input type="text" class="form-control" name="pic" id="tupian"   value="{$ret['pic']}" style="display:none" >
                                                 <input type="file"  name="file"  id="up_tupian"  onChange="Uploadthis('tupian','up_tupian')" style="display:none"  >
                                                 <hr />
                                                        <div>
															<label  class="formtitle" for="form-field-8">超级链接</label>

														<input type="text" name="link" id="form-field-1" value="{$ret['link']}" placeholder="超级链接" class="form-control">
														</div>

														
                                                        
													
                                        
                                                        
													
							
                                                
										
                                    
                                                   
</div>

                                              

													

								{$html}
                                
                                <div class="clearfix form-actions"  style="margin-bottom:-0px;" >
										<div class="col-md-offset-1 col-md-9">
											<input type="submit"  class="btn btn-info " id="save"  value="保存" />

											&nbsp; &nbsp; &nbsp;
											<a href="index.php?r=manage/ad/huan"><button class="btn"  type="button">
												
												返回列表
											</button></a>
										</div>
									</div>
                                    
                                                   </div>
								
                                </form>     

			

			<!-- basic scripts -->

		<!--[if !IE]> -->
		<script src="{__PUBLIC__}assets/js/jquery-2.1.4.min.js"></script>

		<!-- <![endif]-->

		<!--[if IE]>
<script src="{__PUBLIC__}assets/js/jquery-1.11.3.min.js"></script>
<![endif]-->
		<script type="text/javascript">
			if('ontouchstart' in document.documentElement) document.write("<script src='assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>
        <script src="{__PUBLIC__}assets/js/ace-extra.min.js"></script>
	<!-- ace scripts -->
	<!--[if !IE]> -->
		<script src="assets/js/jquery-2.1.4.min.js"></script>

		<!-- <![endif]-->

		<!--[if IE]>
<script src="assets/js/jquery-1.11.3.min.js"></script>
<![endif]-->
		<script type="text/javascript">
			if('ontouchstart' in document.documentElement) document.write("<script src='assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>
		<script src="{__PUBLIC__}assets/js/bootstrap.min.js"></script>

		<!-- page specific plugin scripts -->

		<!--[if lte IE 8]>
		  <script src="{__PUBLIC__}assets/js/excanvas.min.js"></script>
		<![endif]-->
		<script src="{__PUBLIC__}assets/js/jquery-ui.custom.min.js"></script>
		<script src="{__PUBLIC__}assets/js/jquery.ui.touch-punch.min.js"></script>
		<script src="{__PUBLIC__}assets/js/bootbox.js"></script>
		<script src="{__PUBLIC__}assets/js/jquery.easypiechart.min.js"></script>
		<script src="{__PUBLIC__}assets/js/jquery.gritter.min.js"></script>
		<script src="{__PUBLIC__}assets/js/spin.js"></script>

		<!-- ace scripts -->
		<script src="{__PUBLIC__}assets/js/ace-elements.min.js"></script>
		<script src="{__PUBLIC__}assets/js/ace.min.js"></script>




		<!-- inline scripts related to this page -->
        <link rel="stylesheet" href="{__PUBLIC__}global/message/css/jquery.my-message.1.1.css" />
		<script type="text/javascript" src="{__PUBLIC__}global/message/js/jquery.my-message.1.1.js"></script>
        <script src="{__PUBLIC__}global/layer/layer.js"></script>
        <script src="{__PUBLIC__}assets/js/chosen.jquery.min.js"></script>
        <script src="{__PUBLIC__}global/js/Validform_v5.3.2_min.js"></script>
        <script src="{__PUBLIC__}global/js/ajaxfileupload.js"></script>
        <script src="{__PUBLIC__}global/js/index.js"></script>
		<script>
		$('.chosen-select').chosen({allow_single_deselect:true}); 

		ZhiForm("#form","index.php?r=manage/ad/huan","保存中","保存","null");
		//ajax上传
	Uploadthis=function(obj,thisid){
	  layer.load(2);
		$.ajaxFileUpload({  
				url:'index.php?r=manage/File/huan',  
				secureuri:false,  
				fileElementId:thisid,//file标签的id  
				dataType: 'json',//返回数据的类型    
				success: function (data, status) {  
				   $("#"+obj).val(data.url);
				   $('.'+obj).html('<img src="'+data.url+'">');
				   layer.closeAll('loading');
				}
			});  	
		
		}
	function upthis(){
	document.getElementById("up_tupian").click(); 	
     }

		</script>
		
	</body>
</html>
